﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ue.Qcdz.Domain.Shops;
using Ue.Qcdz.Domain.SaleCategorys;

namespace Ue.Qcdz.Domain
{
    public partial class SiteUrls
    {

        /// <summary>
        /// 产品分类列表
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public string SaleCategoryList(object key)
        {
            if (key != null)
                return this.BuildUrl("SaleCategoryList", (key as SaleCategory).Key);
            else
                return "#";

        }
        /// <summary>
        /// 产品分类（用户管理）
        /// </summary>
        /// <returns></returns>
        public string SaleCategory()
        {
            if (SiteContext.GetSiteContext().User != null)
            {
                return this.BuildUrl("SaleCategorys", null);
            }
            return "#";
        }

        /// <summary>
        ///添加 产品分类
        /// </summary>
        /// <returns></returns>
        public string SaleCategoryaEdit()
        {
            if (SiteContext.GetSiteContext().User != null)
            {
                Shop shop = SiteContext.GetSiteContext().Shop;
                if (shop != null)
                    return this.BuildUrl("SaleCategoryaEdit", null);
            }
            return "#";
        }
    }
}
